package cb.wzby;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author wzby
 * @Date: 2022/7/30 14:32
 */
public class Set6 {
    public static void main(String[] args) {
        //克隆一个对象
        Set<Integer> s1 = new HashSet<>(List.of(1,5,3,7,9));
        Set<Integer>  s2 = new HashSet<>(s1);
        s2.add(2);
        System.out.println(s1);
        System.out.println(s2);

    }
}
